package com.itheima.app;

import com.itheima.bean.Dog;
import com.itheima.config.SpringConfig4;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class App4 {
    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext(SpringConfig4.class);
        String[] name = context.getBeanDefinitionNames();
        for(String beanName : name){
            System.out.println(beanName);
        }
        System.out.println("---" + context.getBean(Dog.class));
    }
}
